home *** CD-ROM | disk | FTP | other *** search
- /**************************************************************************\
- |* *|
- |* "BIG_CPS_Speed", v2.1 written for CNet Amiga, v2.63 by Dotoran! *|
- |* *|
- \**************************************************************************/
- options results ; signal on ERROR ; signal on SYNTAX ; signal on IOERR
- tr=transmit ; se=sendstring ; gc=getchar ; qu=query ; gu=getuser
-
- /********************-SysOp-Definable-Variables-**(See-the-README!-file)***/
- c1 = d /* Color of Top Text Line ("The average rate...) */
- c2 = f /* Color or Mid Text Line (Varies w/ CPS Rate) */
- c3 = 6 /* Color of Low Text Line ("Record for this...) */
- c4 = e /* Color of the BIG Numbers ________________________ */
- c5 = b /* Color of the BIG CPS | Use MCI Color Codes! | */
- c6 = 9 /* Color of Little % Numbers ~~~~~~~~~~~~~~~~~~~~~~~~ */
- c7 = f /* Color of Record CPS Number, Handle & Date */
- c8 = f /* Color of Actual CPS Number (Use "x" for BAR Color) */
- c9 = a /* Color of Percent Signs (excluding c7 %) */
- c10 = 8 /* Color of the Grid CPS BAR Travels Across */
- c11 = 6 /* Color of 0-25% CPS Bar Segment */
- c12 = e /* Color of 25-50% CPS Bar Segment */
- c13 = 3 /* Color of 50-75% CPS Bar Segment */
- c14 = b /* Color of 75-100% CPS Bar Segment */
- c15 = 9 /* Color of 100-125% CPS Bar Segment */
- c16 = 1 /* Test Mode (0=Off;Use With BBS, 1=On;Test Colors) */
- c17 = 0 /* Test Mode2 (Only if c16=1; 0=Use ANSI, 1=Use ASCII) */
-
- v1 = 7 /* Reset CPS File(s) After THIS MANY DAYS (Between 0 and 30) */
- v2 = 50 /* Minimum SIZE (in KB) before CPS Rate will be used. */
- v3 = 1 /* Use Separate Upload/Download High CPS Files? (1=Yes, 0=No) */
-
- v4 = 1307358 /* ONLY Modify V4 if told to do so by DOTORAN. */
- /**************************************************************************/
- gu 24 ; baud=result ; gu 1 ; handle=result ; t=time('s') ; line.='c'c4
- gu 28 ; term=result ; gu v4 ; lc=left(upper(result),1)
- file1='sysdata:log/uloads' ; file2='sysdata:log/dloads'
- date=date('s') ; cps=0 ; up=0 ; dn=0
- if c16=1 then do ; cps=random(480,1440,t) ; lc='D' ; end
- if c16=1 & c17=0 then term=2 ; if c16=1 & c17=1 then term=1
- if term>1 then call ANSI ; else call ASCII
- path='pfiles:CPS/' ; file=path||baud ; if v3=1 then file=file||lc
- if ~exists(path) then tr '$omakedir pfiles:CPS}'
- if ~exists(file) then do ; call open(f1,file,'w')
- call writeln(f1,'0|No One Yet!|'date'|x') ; call close(f1) ; end
- call open(f1,file,'r') ; r=readln(f1) ; call close(f1)
- parse var r hi'|'who'|'date1'|'j
- date2=date1+v1 ; if date>date2 then hi=0
- if lc='D' then call GETDOWNCPS ; else call GETUPCPS
- if cps=0 then exit ; else do ; rate=((CPS/baud)*100)%1 ; r=rate%10 ; end
- sp.1='Horrible. Why did you even bother?' ; sp.2='Pathetic. US Mail would have been faster!'
- sp.3='That was pretty lousy.' ; sp.4='Needs work.' ; sp.5='(YAWN)'
- sp.6='Not TOO bad.' ; sp.7='Getting there...' ; sp.8='Looks about right!'
- sp.9='Zooming right along!' ; sp.10='Wow, pretty hot!' ; sp.11='Vroom!'
- sp.12='Speed Demon!' ; sp.13='Broke the sound barrier on that one!'
- sp.14='Outta Sight!' ; sp.15='Lord Almighty!' ; sp.16='Flaming Phone Lines!'
- sp.17='Melting Modems!' ; sp.18='c9HOLY SHITcf!'
- speed=sp.r ; if r<1 then speed=sp.1 ; if r>18 then speed=sp.18
- do k=1 to 4+term ; do i=1 to length(cps) ; m=substr(cps,i,1)
- line.k=line.k||n.m.term.k' ' ; end i ; line.k=line.k' c'c5||cps.term.k ; end k
- tr 'f10Hc'c1'The average rate for this transfer wasn1'
- do i=1 to 4+term ; tr center(line.i,82) ; end i ; c8='c'c8
- tr 'n1c'c2||center(speed,78)'n1' ; if c8='x' then c8=''
- se 'Cc'c6'0c'c9'%>7c'c6'25c'c9'%>7c'c6'50c'c9'%>7c'c6
- tr '75c'c9'%>6c'c6'100c'c9'%>6c'c6'125c'c9'%c'c10
- do i=1 to 3 ; tr sh.term.i ; end i ; color=c11||c12||c13||c14||c15
- se '^2>e' ; d=(rate*.4)%1 ; if d>49 then d=49 ; else if d<1 then d=1
- do i=1 to d ; se 'c'substr(color,(i%10)+1,1)sh.term.4 ; end i
- tr '>1'c8||rate'%n1' ; if cps<=hi then do
- se 'n1c'c3'The Record c'c4'CPS c'c3'at this Baudc'c2': c'c5||left(hi,5)
- tr 'c'c3'Set byc'c2': c'c5||who' c'c3'Onc'c2': c'c9||date('n',date1,'s')'c'c3'!' ; exit ; end
- if cps>hi then do ; se 'n1c9You broke the c'c4'CPS c9record ofc'c2': c'c5||left(hi,5)
- tr 'c9Set byc'c2': c'c5||who'c9 Onc'c2': c'c9||date('n',date1,'s')'c9!'
- call open(f1,file,'w') ; call writeln(f1,cps'|'handle'|'date'|x') ; call close(f1)
- se 'n1cfNEW c'c3'Record c'c4'CPS c'c3'at this Baudc'c2': c'c5||left(cps,5)
- tr 'c'c3'Set byc'c2': c'c5||handle' c'c3'Onc'c2': c'c9||date('n',date,'s')'c'c3'!' ; exit ; end
- GETUPCPS:
- call open(f1,file1,'r') ; do up=1 until eof(f1) ; up.up=readln(f1) ; end up
- call close(f1) ; do i=up-1 to 1 by -1
- parse var up.i 20 hdl.i 40 null 49 cps.i 53 null 70 len.i null
- if handle~=hdl.i then leave i ; if len.i>v2 & cps.i>cps then cps=cps.i
- end i ; return
- GETDOWNCPS:
- call open(f1,file2,'r') ; do dn=1 until eof(f1) ; dn.dn=readln(f1) ; end dn
- call close(f1) ; do i=dn-1 to 1 by -1
- parse var dn.i 20 hdl.i 40 null 49 cps.i 53 null 70 len.i null
- if handle~=hdl.i then leave i ; if len.i>v2 & cps.i>cps then cps=cps.i
- end i ; return
- ASCII:
- n.0.1.1=' ##### ' ; n.0.1.2='# ###' ; n.0.1.3='# # #' ; n.0.1.4='### #' ; n.0.1.5=' ##### '
- n.1.1.1=' ## ' ; n.1.1.2='### ' ; n.1.1.3=' ## ' ; n.1.1.4=' ## ' ; n.1.1.5='####'
- n.2.1.1=' ##### ' ; n.2.1.2='## ##' ; n.2.1.3=' ## ' ; n.2.1.4='### ' ; n.2.1.5='#######'
- n.3.1.1=' ##### ' ; n.3.1.2='## ##' ; n.3.1.3=' ### ' ; n.3.1.4='## ##' ; n.3.1.5=' ##### '
- n.4.1.1='## ## ' ; n.4.1.2='## ## ' ; n.4.1.3='#######' ; n.4.1.4=' ## ' ; n.4.1.5=' ## '
- n.5.1.1='###### ' ; n.5.1.2='## ' ; n.5.1.3='###### ' ; n.5.1.4=' ##' ; n.5.1.5='###### '
- n.6.1.1=' #### ' ; n.6.1.2=' ## ' ; n.6.1.3='###### ' ; n.6.1.4='## ##' ; n.6.1.5=' ##### '
- n.7.1.1='#######' ; n.7.1.2=' ##' ; n.7.1.3=' ## ' ; n.7.1.4=' ## ' ; n.7.1.5=' ## '
- n.8.1.1=' ##### ' ; n.8.1.2='## ##' ; n.8.1.3=' ##### ' ; n.8.1.4='## ##' ; n.8.1.5=' ##### '
- n.9.1.1=' ##### ' ; n.9.1.2='## ##' ; n.9.1.3=' ######' ; n.9.1.4=' ## ' ; n.9.1.5=' #### '
- cps.1.1=' ##### ###### ##### ' ; cps.1.2='## ## ## ## ## ' ; cps.1.3='## ###### ##### '
- cps.1.4='## ## ## ##' ; cps.1.5=' ##### ## ##### '
- sh.1.1='C|--------|---------|---------|--------|----------|' ; sh.1.4='*'
- sh.1.2='C| | | | | |' ; term=1
- sh.1.3='C|--------`---------`---------`--------`----------|' ; return
- ANSI:
- n.0.0.1=' ÜÜÜÜÜ ' ; n.0.0.2='ÛÛ ÜÛÛ' ; n.0.0.3='ÛÛÜß ÛÛ' ; n.0.0.4='ßÛÜÜÜÛß'
- n.1.0.1=' ÜÜ ' ; n.1.0.2='ßÛÛ ' ; n.1.0.3=' ÛÛ ' ; n.1.0.4='ÜÛÛÜ'
- n.2.0.1=' ÜÜÜÜÜ ' ; n.2.0.2='ßß ÛÛ' ; n.2.0.3='ÜÛßßßß ' ; n.2.0.4='ÛÛÜÜÜÜÜ'
- n.3.0.1=' ÜÜÜÜÜ ' ; n.3.0.2='ßß ÛÛ' ; n.3.0.3=' ßßÛÜ' ; n.3.0.4='ßÛÜÜÜÛß'
- n.4.0.1='ÜÜ ÜÜ' ; n.4.0.2='ÛÛ ÛÛ' ; n.4.0.3=' ßßßßÛÛ' ; n.4.0.4=' ÛÛ'
- n.5.0.1='ÜÜÜÜÜÜÜ' ; n.5.0.2='ÛÛÜÜÜÜ ' ; n.5.0.3=' ÛÛ' ; n.5.0.4='ßÛÜÜÜÛß'
- n.6.0.1=' ÜÜÜ ' ; n.6.0.2='ÜÛß ' ; n.6.0.3='ÛÛßßßÛÜ' ; n.6.0.4='ßÛÜÜÜÛß'
- n.7.0.1='ÜÜÜÜÜÜÜ' ; n.7.0.2=' ÛÛ' ; n.7.0.3=' ÜÛß ' ; n.7.0.4=' ÛÛ '
- n.8.0.1=' ÜÜÜÜÜ ' ; n.8.0.2='ÛÛ ÛÛ' ; n.8.0.3='ÜÛßßßÛÜ' ; n.8.0.4='ßÛÜÜÜÛß'
- n.9.0.1=' ÜÜÜÜÜ ' ; n.9.0.2='ÛÛ ÛÛ' ; n.9.0.3=' ßßßßÛÛ' ; n.9.0.4='ßÛÜÜÜÛß'
- cps.0.1=' ÜÜÜÜÜ ÜÜÜÜÜÜ ÜÜÜÜÜ ' ; cps.0.2='ÛÛ ßß ÛÛ ÛÛ ÛÛ ßß'
- cps.0.3='ÛÛ ÛÛßßßß ßßßßÛÜ' ; cps.0.4='ßÛÜÜÜÛß ÛÛ ßÛÜÜÜÛß'
- sh.0.1='CÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄ´' ; sh.0.4='Û'
- sh.0.2='C³ ³ ³ ³ ³ ³' ; term=0
- sh.0.3='CÃÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄ´' ; return
- ERROR: ; SYNTAX: ; IOERR: ; tr 'ERROR:'rc' ('errortext(rc)') @ 'sigl
- logentry 'ER:'rc' ('errortext(rc)') @ 'sigl' BIG CPS Speed v2.0'
- bufferflush ; exit
- /* < END OF FILE MARKER > */
-